package com.bankwel.j2d.ui;

import java.awt.Graphics;

import javax.swing.JPanel;

import com.bankwel.j2d.model.Object2d;

public class J2dPanel extends JPanel {

	private static final long serialVersionUID = 1L;

	private Object2d obj;

	public J2dPanel(Object2d obj) {
		this.obj = obj;
	}

	public Object2d getObj() {
		return obj;
	}

	public void setObj(Object2d obj) {
		this.obj = obj;
	}

	@Override
	protected void paintComponent(Graphics g) {
		super.paintComponent(g);
		obj.draw(g);
	}
}
